package com.zimmur.app.mocolink.background.fdfs;

public class FileContentTypeUtil {
	/**
	 * 
	 * @param fileExt 不带.的文件扩展名
	 * @return
	 */
	public static String getcontentType(String fileExt){
		if (fileExt.equals("xls"))
	      {
	        return "application/vnd.ms-excel";
	      }
	      if (fileExt.equals("doc"))
	      {
	        return "application/msword";
	      }
	      if (fileExt.equals("txt"))
	      {
	        return "text/plain";
	      }
	      if (fileExt.equals("pdf"))
	      {
	        return "application/pdf";
	      }
	      if (fileExt.equals("jpg")||fileExt.equals("jpeg"))
	      {
	        return "image/jpeg";
	      }
	      if (fileExt.equals("ppt"))
	      {
	        return "application/vnd.ms-powerpoint";
	      }
	      if (fileExt.equals("gif"))
	      {
	        return "image/gif";
	      }
	      if (fileExt.equals("png"))
	      {
	        return "image/png";
	      }
	      if(fileExt.equals("apk")){
	    	  return "application/vnd.android.package-archive";
	      }
	      return "text/html";
	}
}
